﻿
@{
    Layout = null;
    string uname = ViewBag.UserName;
    int regrank = ViewBag.RegRank;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>注册成功！</title>
    <style type="text/css">
        body {
            background-color: rgb(245, 184, 16);
            width: 100vw;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            animation: show 0.7s ease-in-out;
        }

        @@keyframes show {
            0% {
                transform: scale(0);
            }

            60% {
                transform: scale(1.2);
            }

            100% {
                transform: scale(1);
            }
        }

        .cenbox {
            width: 600px;
            height: 350px;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            background-color: white;
            border-radius: 10px;
            box-shadow: 2px 2px 8px #d0790d;
            position: relative;
        }

            .cenbox h1 {
                color: #ff9200;
                font-size: 2.6rem;
                animation: show 0.7s ease-in-out 0.1s;
            }

            .cenbox p,
            .cenbox p span {
                color: #666;
                font-size: 0.9rem;
            }

            .cenbox img {
                position: absolute;
                left: -30px;
                bottom: -10px;
                width: 210px;
            }

        #pname {
            color: orange;
        }

        .regcount {
            color: red;
        }
    </style>
</head>
<body>
    <div class="cenbox">
        <h1>恭喜您,注册成功!</h1>
        <p><span id="pname">@@@(uname)</span>,欢迎您！您是第 <b class="regcount">@(regrank)</b> 位注册的用户!</p>
        <p>将在 <span id="tik">8</span> 秒后自动跳转至<a href="/UserLogin/Login">登录页</a></p>
        <img src="/Content/Images/people.png" />
    </div>
    <script type="text/javascript">
        var dom = document.getElementById("tik");
        var tik = parseInt(dom.innerHTML);
        setInterval(() => {
            tik -= 1;
            dom.innerHTML = tik;
            if (tik <= 0) {
                window.location = "/UserLogin/Login";
            }
        }, 1000);
    </script>
</body>
</html>

